<template>
  <div class="unitBar">
        <div class="componentTitle">这是piniaInput.vue子组件</div>
        <div class="componentInfo">
           <span>{{name}}</span>
           <span>{{count}}</span>
        </div>
    </div>
</template>

<script setup>
import {useUserStore} from '@/store/user.js';
import {storeToRefs} from 'pinia'
const store=useUserStore();
const {name,count}=storeToRefs(store)
</script>

<style scoped>
.unitBar{
    width: 100%;
    border: 2px solid #0076ee;
}
.componentTitle{
  width: 100%;
  height: 30px;
  background-color:  #0076ee;
  line-height: 30px;
  text-align: center;
  color: #ffff;
}
.componentInfo{
 margin-left: 20px;
}

</style>